third-party-prc-api
Get Court Cases
URLS:
Description : This API returns the court cases details based on name or nationalId. pageNumber, numberOfRecords, caseNumber, caseYear, partyType, caseType, caseClosed, custNameOrNatId are being received in the request body from the channel.
Channels can consume Mulesoft’s REST API exposed as an experience API.
Mulesoft Request:
Mandatory Headers: x-correlation-id, client_id, client_secret, x-channel-id, x-bank-id
Optional Headers: x-sub-channel-id, x-user-id, x-debug-flag, x-customer-id, Authorization
Headers
Below headers are need to be sent to all the qbank endpoints
HeaderName | HeaderType | Optional? |
---|---|---|
accept | application/json | Mandatory |
content-type | application/json | Mandatory |
charset | utf-8 | Mandatory |
Authorization | Basic | Mandatory |
Body:
{
"pageNumber": 1,
"numberOfRecords": 10,
"caseNumber": 0,
"caseYear": 0,
"partyType": 0,
"caseType": 0,
"caseClosed": 0,
"custNameOrNatId": "name"
}
Mulesoft Response:
Success Response: (200)
Response Body: application/json
{
"status": {
"success": true,
"code": "200",
"arabicMessage": "تمت العملية بنجاØ",
"englishMessage": "The Operation has been Successfully Completed"
},
"response": {
"cases": [{
"name": "sampleName",
"nationalId": "natId123",
"partyType": "party_type",
"partyId": "party_id",
"caseNumber": "caseNumer123",
"issuedBy": "issuedBy",
"caseType": "caseType",
"caseId": "caseId123",
"result": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc et facilisis nisl, quis pellentesque ante. Praesent id dui eget quam scelerisque venenatis. Curabitur a quam et lorem efficitur pellentesque ut at massa. ",
"classification": "classification",
"pdfFile": "pdf"
},
{
"name": "sampleName",
"nationalId": "natId123",
"partyType": "party_type",
"partyId": "party_id",
"caseNumber": "caseNumer123",
"issuedBy": "issuedBy",
"caseType": "caseType",
"caseId": "caseId123",
"result": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc et facilisis nisl, quis pellentesque ante. Praesent id dui eget quam scelerisque venenatis. Curabitur a quam et lorem efficitur pellentesque ut at massa. ",
"classification": "classification"
}
]
}
}
Sample Error Response:
Error codes :
400:
content-type: JSON
{
"status": {
"success": false,
"code": "400",
"reasonCode": "BadRequest",
"arabicMessage": "لم يتم العثور على سجلات تطابق Ù…Øددات البØØ«",
"englishMessage": "No records were found that matched the selection criteria",
"backendError": "No records were found that matched the selection criteria",
"backendCode": "T24003790"
}